package org.geebis.powerbrake;

public enum Kind {
    MOVIE(0, "Movie"),
    NORMAL(1, "Normal"),
    AUDIO_BOOK(2, "AudioBook"),
    WHACKED_BOOKMARK(5, "WhackedBookmark"),
    MUSIC_VIDEO(6, "MusicVideo"),
    SHORT_FILM(9, "ShortFilm"),
    TV_SHOW(10, "TV"),
    BOOKLET(11, "Booklet");

    private int value;
    private String stringValue;

    Kind(final int i, final String stringValue) {
        this.value = i;
        this.stringValue = stringValue;
    }

    public int getNumericValue() {
        return this.value;
    }

    public static Kind getKind(String stringValue) {
        for (Kind candidate : Kind.values()) {
            if (candidate.stringValue.equals(stringValue)) {
                return candidate;
            }
        }
        throw new IllegalArgumentException("Cant find Kind with string value: " + stringValue);
    }
}
